package day1108.demo01;

/**
 * @author wql
 * @version 1.0
 * @date 2022/11/8 10:04
 */

public class BookFactory {
    public static Book creatdBook(String t){
            if (t.equals("Hua")){
                return new Hua();
            }else if(t.equals("Ship")){
                return new Ship();
            }
            return null;
    }
}
